--
-- Created by IntelliJ IDEA.
-- User= wzq
-- Date= 16-10-8
-- Time= 下午5=22
-- To change this template use File | Settings | File Templates.
--

local CODES = {
  OK = 0,
  SYSTEM_ERROR = -1,
  RUNTIME_INCONSISTENCY = -2,
  DATA_INCONSISTENCY = -3,
  CONNECTION_LOSS = -4,
  MARSHALLING_ERROR = -5,
  UNIMPLEMENTED = -6,
  OPERATION_TIMEOUT = -7,
  BAD_ARGUMENTS = -8,
  API_ERROR = -100,
  NO_NODE = -101,
  NO_AUTH = -102,
  BAD_VERSION = -103,
  NO_CHILDREN_FOR_EPHEMERALS = -108,
  NODE_EXISTS = -110,
  NOT_EMPTY = -111,
  SESSION_EXPIRED = -112,
  INVALID_CALLBACK = -113,
  INVALID_ACL = -114,
  AUTH_FAILED = -115
}

function validateCode(code)
  assert(type(code) == 'number', 'code must be number')
  -- TODO
end